Ext.onReady(function() 
{
	Ext.QuickTips.init();
    var viewport = Ext.create('Ext.Viewport', 
    {
    	layout: 'border',
        items: 
        [
         	{
                xtype: 'toolbar',
                id: 'header',
                region: 'north',
                items : [  
                    {
                    	xtype : 'tbtext',
                    	text : 'Carbon Footprint Calculator',
                    	style:'color:white; font-size: 20px; font-family:arial;'
                    }, 
                    {
                    	xtype : 'tbfill',                     	 
					}, 
					{
						xtype: 'button', 
                	 	text: 'Log out', 
                	 	handler:function(){window.location = "LogoutServlet";} 
					}
               ]
            }, 
         	getTree(),	
         	getTabsPanel()
        ]
    });
	setTimeout(function()
			{
				Ext.get('loading').remove();
				Ext.get('loading-mask').fadeOut({remove:true});
			}, 250);
});
